<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta content="最热前端框架,爱尚博客,前端趋势,微信小程序制作,小程序教程,前端怎么做app,app制作,网站开发,靠谱的网站开发,app开发,小程序开发,小程序开发多少钱,app开发多少钱,网站开发多少钱"
        name="Keywords">
    <meta name="description" content="爱尚博客-让前端萌新少走弯路的博客！" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
    <title>爱尚博客-爱尚前端</title>
    <link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
    <script src="../../../common/public.js"></script>
    <link rel="stylesheet" href="../../css/e.css">
    <link rel="stylesheet" href="./css/msg.css">
</head>

<body>
    <div class="box" v-cloak>
        <el-button type="primary" style="margin-bottom:10px;" @click.native="dialogFormVisible1 = true">新建消息</el-button>
        <el-table :data="tableData" border style="width: 100%">
            <el-table-column prop="Id" label="ID" width="180">
            </el-table-column>
            <el-table-column prop="conts" label="内容" width="180">
            </el-table-column>
            <el-table-column prop="url" label="地址">
            </el-table-column>
            <el-table-column prop="flag" label="状态">
                <template slot-scope="scope">
                    <el-switch v-model="scope.row.flag2" active-color="#13ce66" inactive-color="#ff4949" disabled>
                    </el-switch>
                </template>
            </el-table-column>
            <el-table-column prop="timer" label="结束时间">
            </el-table-column>
            <el-table-column prop="new_timer" label="开始时间">
            </el-table-column>
            <el-table-column label="编辑">
                <template slot-scope="scope">
                    <el-button type="primary" plain @click.native="save(scope,true)">编辑</el-button>
                    <el-button type="danger" plain @click.native="del(scope)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>

        <!-- 详情 -->
        <el-dialog title="编辑消息" :visible.sync="dialogFormVisible">
            <el-form :model="form">
                <el-form-item label="Id" :label-width="formLabelWidth">
                    <el-input v-model="form.Id" autocomplete="off" disabled></el-input>
                </el-form-item>
                <el-form-item label="内容" :label-width="formLabelWidth">
                    <el-input type="textarea" v-model="form.conts" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="地址" :label-width="formLabelWidth">
                    <el-input type="textarea" v-model="form.url" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="状态" :label-width="formLabelWidth">
                    <el-switch v-model="form.flag1" active-color="#13ce66" inactive-color="#ff4949">
                    </el-switch>
                </el-form-item>
                <el-form-item label="结束时间" :label-width="formLabelWidth">
                    <el-date-picker v-model="form.timer" type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间">
                    </el-date-picker>
                </el-form-item>
                <el-form-item label="开始时间" :label-width="formLabelWidth">
                    <el-input v-model="form.new_timer" autocomplete="off" disabled></el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogFormVisible = false">取 消</el-button>
                <el-button type="primary" @click="save()">确 定</el-button>
            </div>
        </el-dialog>
        <!-- 详情 -->

        <!-- 新建 -->
        <el-dialog title="新建消息" :visible.sync="dialogFormVisible1">
            <el-form :model="form1">
                <el-form-item label="内容" :label-width="formLabelWidth">
                    <el-input type="textarea" v-model="form1.conts" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="地址" :label-width="formLabelWidth">
                    <el-input type="textarea" v-model="form1.url" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="状态" :label-width="formLabelWidth">
                    <el-switch v-model="form1.flag" active-color="#13ce66" inactive-color="#ff4949">
                    </el-switch>
                </el-form-item>
                <el-form-item label="结束时间" :label-width="formLabelWidth">
                    <el-date-picker v-model="form1.timer" type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
                        placeholder="选择日期时间">
                    </el-date-picker>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogFormVisible1 = false">取 消</el-button>
                <el-button type="primary" @click="new_msgs()">确 定</el-button>
            </div>
        </el-dialog>
        <!-- 新建 -->
    </div>
</body>
<script src="../../../common/v.js"></script>
<script src="../../../common/a.js"></script>
<script src="../../js/e.js"></script>
<script src="./js/msg.js"></script>

</html>